import org.w3c.dom.ls.LSOutput;

import javax.xml.namespace.QName;

public abstract class Animal
{
    private String name;
    public Animal(String name){this.name=name;}

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public abstract  void eat();

    public static void main(String[] args) {
        Animal animal = new Dog("xuxu");
        animal.eat();
    }
}


class Dog extends Animal
{

    public Dog(String name)
    {
        super(name);
    }
    private String name;
//    public Dog(){};
    public void eat(String name)
    {
        System.out.println(this.name+"::eat");
    }
    public void jiao(String name)
    {
        System.out.println(this.name+" ");
    }
    public void eat(){
        System.out.println("旭旭是个菜狗！");
    }
}



class Cat extends Animal
{
    public Cat()
    {
        super("CHUANCHUAN");
    }
    public void eat(){
        System.out.println("旭旭是个菜狗！");
    }

}

